<!--<script type="text/javascript" src="{{$LAYOUT_HELPER_URL}}front/js/jquery.min.js"></script>-->
 <script type="text/javascript">
$(document).ready(function(){
  $("#button").click(function(){
    $(".show2").show();
    $("#re").removeClass("commentContent");
    $("#add").addClass("commentContent");
  });
});
</script>  
<script type="text/javascript">
function clearForm(oForm) {
    
      var elements = oForm.elements; 
        
      oForm.reset();

      for(i=0; i<elements.length; i++) {
          
        field_type = elements[i].type.toLowerCase();
        
        switch(field_type) {
        
            case "text": 
            case "password": 
            case "textarea":
                case "hidden":  
                
                elements[i].value = ""; 
                break;
            
            case "radio":
            case "checkbox":
                if (elements[i].checked) {
                    elements[i].checked = false; 
                }
                break;

            case "select-one":
            case "select-multi":
                        elements[i].selectedIndex = -1;
                break;

            default: 
                break;
        }
        }
    }

function submitFormComment()
{
    $('.frmComment').submit();
}

$().ready(function() {
    // validate signup form on keyup and submit
    jQuery("input").click(function(){
        var defaultVal = jQuery(this).attr('title');
        if (jQuery(this).val() == defaultVal) {
            jQuery(this).val('');
        }
    });
    jQuery("input").focusout(function(){
        var defaultVal = jQuery(this).attr('title');
        if (jQuery(this).val() == '') {
            jQuery(this).val(defaultVal);
        }
    });
    jQuery("textarea").click(function(){
        var defaultVal = jQuery(this).attr('title');
        if (jQuery(this).html() == defaultVal) {
            jQuery(this).html('');
        }
    });
    jQuery("textarea").focusout(function(){
        var defaultVal = jQuery(this).attr('title');
        if (jQuery(this).html() == '') {
            jQuery(this).html(defaultVal);
        }
    });

});

</script>         
                            <h3>{{l}}Comment{{/l}}</h3>
                            {{foreach from=$comments item=item key=index}}
                            <div {{if $index is odd}}class="bgGray"{{else}}class="bgWhite"{{/if}}>
                                <p><em>{{$item.name}}</em></p>
                                <p>{{$item.comment}}</p>
                                <br>
                            </div>
                            {{/foreach}}
                            <h4>{{l}}Comment Form{{/l}}</h4>
                            
                            <form class="frmComment" action="#" method="post" >
                                <div class="commentLeft first">
                                    <p><input name="data[name]" type="text" value="{{l}}Company Name{{/l}}" title="{{l}}Company Name{{/l}}"/></p>
                                    <p><input name="data[email]" type="text" value="{{l}}Email{{/l}}" title="{{l}}Email{{/l}}"/></p>
                                    <p><input name="data[phone]" type="text" value="{{l}}Phone{{/l}}" title="{{l}}Phone{{/l}}"/></p>
                                </div>
                                <div class="commentLeft">
                                 <input type="hidden" name="formid" value="{{$sm}}"/>
                                    <p><textarea name="data[comment]" cols="1" rows="1" value="{{l}}Comment{{/l}}" title="{{l}}Comment{{/l}}" >{{l}}Comment{{/l}}</textarea></p>
                                    <p><a href="javascript:submitFormComment();"><input name="submit" type="submit" value="{{l}}Send{{/l}}" class="btnComment"/></a> 
                                    <input onclick="javascript:this.form.reset();" type="button" value="{{l}}Reset{{/l}}" class="btnComment"/> </p>
                                
                                </div>
                            </form>